package exception;
//异常的抛出
public class ThrowDemo {
    public static void main(String[] args) {
        Person p=new Person();
        try {
            p.setAge(2000);
            System.out.println("此人年龄"+p.getAge());
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }

    }
}
